package weekMatch.two_104;

import java.util.Arrays;

public class LeeCode_02 {
    public static void main(String[] args) {

    }
    private static int matrixSum(int[][] nums) {
        int ans = 0;
        for (int[] num : nums) {
            Arrays.sort(num);
        }
        int n = nums[0].length, m = nums.length;
        int index = n - 1;
        for (int i = index; i >= 0; i--) {
            int max = 0;
            for (int[] num : nums) {
                max = Math.max(num[i], max);
            }
            ans += max;
        }
        return ans;
    }
}
